<?php 
include '../data/data.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<meta name="screen-orientation" content="portrait">
<meta name="keywords" content="H5 HTML5 H5游戏 HTML5游戏 小游戏 手机游戏 网页游戏 在线游戏 点击即玩 <?php echo $rowx[name]; ?> <?php echo $rowx[name]; ?> H5平台 资讯 新闻 攻略 视频 ">
<meta name="description" content="<?php echo $rowx[name]; ?>是一个行业领先的H5在线游戏平台，玩游戏不再苦苦的等待下载，点击即玩。">
<title>资讯 - <?php echo $rowx[name]; ?>在线游戏平台</title>
<link rel="stylesheet" href="/public/styles/base.css"/>
<link rel="stylesheet" href="/styles/news.css"/>
    <link rel="stylesheet" href="/css/new.css"/>
    <link rel="stylesheet" href="/styles/ranking.css"/>
<style>.game_news li.loading{display:block;-webkit-box-sizing:content-box;-o-box-sizing:content-box;-ms-box-sizing:content-box;box-sizing:content-box;width:auto;}</style>
</head>

<body class="bg00">
<div style="height: 50px;border-bottom: 1px solid #f4f4f4;border-top: 1px solid #f4f4f4;position: relative;">
    <div class="gokb">
                    <a target="_top" href="/user/user.html">
                <img src="/images/user_center/default_im.png" alt="">
            </a>
            </div>
    <div class="search newser">
        <input type="text" id="search_ipt" placeholder="请输入搜索内容" autocomplete="on" class="left_input">
        <input type="submit" id="search_btn" class="search_icon" value="">
    </div>
</div>
<!--div.container 总外框  start-->
<div data-role="page" class="z_container news bg01">
    <!--div.z_min 内容区域 statr-->
    <div class="z_main" data-role="conent">
        <nav class="play_list">
<!--            <i class="icons logo"></i>-->
            <ul id="list_nav" class="ui-grid-d">
                <li style="margin-left: 5%;">全部</li>
                <li>活动</li>
                <li>公告</li>
            </ul>
        </nav>
        <div style="width: 100%;height: 1px;background: #f4f4f4;"></div>
        <!--div.center 游戏咨询标题栏  end-->

        <!--div.game_news 游戏咨询  statr-->
        <section class="swipe" id="news_list" style="visibility: visible;">
        <div class="swipe-wrap" style="width: 1596px;">
            <ul class="game_news" data-index="0" style="width: 399px; left: 0px; transition-duration: 0ms; transform: translate(0px, 0px) translateZ(0px);">
              <?php  
$result = $conn->query("SELECT id, logo, name, date FROM info WHERE userid LIKE '%$dl%' ORDER BY id DESC");
 
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
$startdate=$row[date];//开始时间
$enddate=date("Y-m-d");//结束时间
$date=floor((strtotime($enddate)-strtotime($startdate))/86400);
      if($date=='0'){
      $a3='当天';
      }else{
      $a3=$date.'天前';
      }
      echo '<li style="">';
      echo '<a href="/info/detail.html?info_id='.$row[id].'"><img src="'.$row[logo].'" width="120" height="70" alt="'.$row[name].'"></a>';
      echo '<div style="width: 60%">';
      echo '<p><a href="/info/detail.html?info_id='.$row[id].'">'.$row[name].'</a></p>';
      echo '<p style="display: block">'.$a3.'</p>';
      echo '</div>';
      echo '</li>';
    }
}
?>   
    <div style="width: 100%; height: 1px; background: rgb(244, 244, 244);"></div>

            </ul>
<ul class="game_news" data-index="1" style="width: 399px; left: -399px; transition-duration: 400ms; transform: translate(0px, 0px) translateZ(0px);">
<?php  
$result = $conn->query("SELECT id, logo, name, date FROM info WHERE userid LIKE '%$dl%' and type='1' ORDER BY id DESC");
 
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
$startdate=$row[date];//开始时间
$enddate=date("Y-m-d");//结束时间
$date=floor((strtotime($enddate)-strtotime($startdate))/86400);
      if($date=='0'){
      $a3='当天';
      }else{
      $a3=$date.'天前';
      }
      echo '<li style="">';
      echo '<a href="/info/detail.html?info_id='.$row[id].'"><img src="'.$row[logo].'" width="120" height="70" alt="'.$row[name].'"></a>';
      echo '<div style="width: 60%">';
      echo '<p><a href="/info/detail.html?info_id='.$row[id].'">'.$row[name].'</a></p>';
      echo '<p style="display: block">'.$a3.'</p>';
      echo '</div>';
      echo '</li>';
    }
}
?>   
    <div style="width: 100%; height: 1px; background: rgb(244, 244, 244);"></div>
</ul>
<ul class="game_news" data-index="2" style="width: 399px; left: -399px; transition-duration: 400ms; transform: translate(0px, 0px) translateZ(0px);">
<?php  
$result = $conn->query("SELECT id, logo, name, date FROM info WHERE userid LIKE '%$dl%' and type='2' ORDER BY id DESC");
 
if ($result->num_rows > 0) {
    while($row = $result->fetch_assoc()) {
$startdate=$row[date];//开始时间
$enddate=date("Y-m-d");//结束时间
$date=floor((strtotime($enddate)-strtotime($startdate))/86400);
      if($date=='0'){
      $a3='当天';
      }else{
      $a3=$date.'天前';
      }
      echo '<li style="">';
      echo '<a href="/info/detail.html?info_id='.$row[id].'"><img src="'.$row[logo].'" width="120" height="70" alt="'.$row[name].'"></a>';
      echo '<div style="width: 60%">';
      echo '<p><a href="/info/detail.html?info_id='.$row[id].'">'.$row[name].'</a></p>';
      echo '<p style="display: block">'.$a3.'</p>';
      echo '</div>';
      echo '</li>';
    }
}
?>  
    <div style="width: 100%; height: 1px; background: rgb(244, 244, 244);"></div>
            </ul>

        </div>
        </section>
        <!--div.game_news 游戏咨询  end-->

        <div class="footer_padding"></div>
    </div>
    <!--div.z_min 内容区域 end-->
</div>
<!--div.container 总外框  end-->
<!--footer 底部 start-->
<footer id="footer" class="z_footer" style="">
    <nav>
        <a target="_top" href="/index.html" style="margin-left: 2%;" >
            <p class="img_1"><img src="/picture/home.png" alt=""></p>
            <p class="img_2"><img src="/picture/home1.png" alt=""></p>
            <span>首页</span>
        </a>
        <a target="_top" href="/game/type.html?tc=GM" >
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>GM</span>
        </a>
        <a target="_top" href="/game/game.html?tc=rm" title="">
            <p class="img_1"><img src="/picture/game.png" alt=""></p>
            <p class="img_2"><img src="/picture/game1.png" alt=""></p>
            <span>BT</span>
        </a>
        <a target="_top" href="/user/user.html" title="">
            <p class="img_1"><img src="/picture/user.png" alt=""></p>
            <p class="img_2"><img src="/picture/user1.png" alt=""></p>
            <span>我的</span>
        </a>
    </nav>
</footer>
<link href="/css/app.css" rel="stylesheet" type="text/css">
<div id="weixin_an" style="display: none">
    <div class="click_opacity"></div>
    <div class="to_btn">
        <span class="span1"><img src="/public/channel/click_btn.png"></span>
        <span class="span2"><em>1</em> 点击右上角<img src="/public/channel/menu_android.png">打开菜单</span>
        <span class="span2 android_open"><em>2</em> 选择<img src="/public/channel/android.png"></span>
        <span class="span2 android_open"><em>3</em> 重新登录账号充值</span>
    </div>
</div>

<!--二维码-->
<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.qrcode.min.js"></script>

<!--<div class="qrcode_image">-->
<!--        <img src="/qrcode/game.html?addr=--><!--">-->
<!--</div>-->


<script src="/public/scripts/jquery-1.11.1.min.js"></script>
<script src="/public/scripts/jquery.mobile.min.js"></script>
<script src="/jquery/swipe.js"></script>
<script>
$(function(){
	var banner_slider = new Swipe(document.getElementById('banner_silider'), {
	  startSlide: 0,
	  speed: 400,
	  auto: 3000,
	  continuous: true
	});

    var nomore = '<label>没有更多数据了</label>';
    var cache = [
        {pn:1,more:1},
        {pn:1,more:1},
        {pn:1,more:1},
        {pn:1,more:1}
    ];
    var limit = 6;
    var loading = false;
    function pull(index)
    {
        if( loading || cache[index].more == 0 ) return false;
        var type = $('#list_nav li').eq(index).text();
        var pn = cache[index].pn++;
        loading = true;

    }
    var start_slide = 0;
    if( '' == '' ) {
    	$('#list_nav li:eq(0)').addClass('list_active');
        pull(0);
    } else {
    	$('#list_nav li').each(function(i){
    		var _t = $(this);
    		if( _t.text() == '' ) {
    			_t.addClass('list_active');
    			start_slide = i;
    			pull(i);
    		}
    	});
    }

	var news_slider = new Swipe(document.getElementById('news_list'), {
	  startSlide: start_slide,
	  speed: 400,
	  auto: false,
	  callback: function(index, elem) {
		  $('#list_nav li').removeClass('list_active').eq(index).addClass('list_active');
		  if( cache[index].pn == 1 && cache[index].more == 1 ) {
			  pull(index);
		  }
	  }
	});
	$('#list_nav li').on('tap', function(){
		news_slider.slide($(this).index(), 400);
		return true;
	});
    $(".loading").on('tap',function(){
        pull(news_slider.getPos());
    });
	// $(window).on('scrollstop', function(){
    //     var t_h = $('.z_main').height();
    //     var c_h = $(document).scrollTop();
    //     if( c_h == 0 ) c_h = $('.z_container').scrollTop();
    //     c_h += $(window).height() + 10;
    //     if( c_h >= t_h ) {
    //         pull(news_slider.getPos());
    //     }
    // });
});
</script>
      <script>
        $('#search_btn').on('tap', function(){
            var v = $.trim($('#search_ipt').val());
            v = v.replace(/[\'\"\?`~\!\$\%\^\*\(\)\[\]\{\}\-\+\\]+/, '');
            $('#search_ipt').val(v);
            if( v == '' ) {
                alert('请输入游戏名称、拼音或关键字！');
                $('#search_ipt').focus();
                return false;
            }
            location.href = '/search.html?search='+ encodeURIComponent(v);
        });
        $('#search_ipt').bind('keydown',function(event){
            if(event.keyCode == "13") {
                var v = $.trim($('#search_ipt').val());
                v = v.replace(/[\'\"\?`~\!\$\%\^\*\(\)\[\]\{\}\-\+\\]+/, '');
                $('#search_ipt').val(v);
                if( v == '' ) {
                    alert('请输入游戏名称、拼音或关键字！');
                    $('#search_ipt').focus();
                    return false;
                }
                location.href = '/search.html?search='+ encodeURIComponent(v);
            }
        });
    </script>
</body>
</html>